$('.autoheight-textarea').val('for i in range(0, len(arr)):\n' +
    '    if arr[i] != 0: continue\n' +
    '    for j in range(i, len(arr)):\n' +
    '        if arr[j] != 0: continue\n' +
    '        if sum(arr[i:j]) > k: break\n' +
    '        ret += 1')

$('.autoheight-textarea').each(function () {
    $(this).height(this.scrollHeight);
});

$('.autoheight-textarea-on').keyup(function () {
    $(this).height(this.scrollHeight-10);
});

$('.ant-radio').click(function () {
    $(this).parents('.questioncont').find('.ant-radio-wrapper').removeClass('ant-radio-wrapper-checked')
    $(this).parents('.questioncont').find('input').attr('clicked',false)
    $(this).parent('.ant-radio-wrapper').find('input').attr('clicked',true)
    $(this).parents('.questioncont').find('.ant-radio').removeClass('ant-radio-checked')
    $(this).parent('.ant-radio-wrapper').toggleClass('ant-radio-wrapper-checked')
    $(this).toggleClass('ant-radio-checked')
})
